﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Drawing.Printing;
using Model.Custome;
using Framework.Common;
using Framework;

namespace DomPrint
{
    public partial class HDHSShowForm : BaseShowForm
    {
        public HDHSShowForm(int printNum, List<ListItemInfo> listItem)
            : base(printNum, listItem)
        {
            InitializeComponent();
        }

        private void HDHSShowForm_Load(object sender, EventArgs e)
        {
            try
            {
                PrintPrepare();
                foreach (ListItemInfo item in listItem)
                {
                    Bitmap map = GetBarCode(item.JZBH);
                    pictureBox1.Image = map;
                    pictureBox2.Image = map;

                    if (item.JZLSH.IsNotEmpty())
                    {
                        lblNo1.Text = "流水号:" + item.JZLSH;
                        lblNo2.Text = "流水号:" + item.JZLSH;
                    }
                    else
                    {
                        lblNo1.Text = "";
                        lblNo2.Text = "";
                    }
                    DoPrint();
                }
                //this.Close();
            }
            catch (Exception ex)
            {
                LogHelper.ErrorFormat("HDDomShowForm Load exception:{0}{1}", ex.Message, ex.StackTrace);
            }
        }

    }
}
